nm_req = '>= 1.10.4'
secret_req = '>= 0.18'
+fs = import('fs')
gnome = import('gnome')
i18n = import('i18n')
endif
if get_option('man')
- a2x = find_program('a2x')
- subdir('man')
+ if fs.exists('man/gnome-shell.1')
+ install_man('man/gnome-shell.1')
+ else
+ a2x = find_program('a2x')
+ subdir('man')
+ endif
endif
mutter_typelibdir = mutter_dep.get_pkgconfig_variable('typelibdir')
endif
meson.add_install_script('meson/postinstall.py')
+meson.add_dist_script('meson/generate-manpages.py')
summary_options = {
'networkmanager': get_option('networkmanager'),
--- /dev/null
+#!/usr/bin/env python3
+
+import os
+from pathlib import PurePath
+from asciidocapi import AsciiDocAPI
+
+man_pages = [
+ 'man/gnome-shell.1',
+ 'subprojects/extensions-tool/man/gnome-extensions.1',
+]
+
+sourceroot = os.environ.get('MESON_SOURCE_ROOT')
+distroot = os.environ.get('MESON_DIST_ROOT')
+
+asciidoc = AsciiDocAPI()
+
+for man_page in man_pages:
+ page_path = PurePath(man_page)
+ src = PurePath(sourceroot, page_path.with_suffix('.txt'))
+ dst = PurePath(distroot, page_path)
+ stylesheet = src.with_name('stylesheet.xsl')
+
+ asciidoc.options('--xsl-file', os.fspath(stylesheet))
+ asciidoc.execute(os.fspath(src), outfile=os.fspath(dst))
gio_req = '>= 2.56.0'
+fs = import('fs')
gnome = import('gnome')
i18n = import('i18n')
endif
if get_option('man')
- a2x = find_program('a2x')
-
- subdir('man')
+ if fs.exists('man/gnome-extensions.1')
+ install_man('man/gnome-extensions.1')
+ else
+ a2x = find_program('a2x')
+ subdir('man')
+ endif
endif
if not meson.is_subproject()